Skip to content

Finally fix CI module case and invoke deletion of ecm.info file when no encrypted channels is present#3704

Merged
jbleyel merged 3 commits intoopenatv:masterfrom
WXbet:fix-softcsa
Feb 12, 2026
Merged

Finally fix CI module case and invoke deletion of ecm.info file when no encrypted channels is present#3704
jbleyel merged 3 commits intoopenatv:masterfrom
WXbet:fix-softcsa

Conversation

@WXbet
Copy link
Contributor

@WXbet WXbet commented Feb 11, 2026

Revert "[SoftCSA] Deactivate software descrambling when CI module handles decryption"
[SoftCSA] Suppress activation when CI module handles decryption (confirmed by @atvhusky)
[CAHandler] Send CMD_NOT_SELECTED when last service is unregistered

Please do NOT squash the commits

Add shouldSuppressActivation callback to eDVBCSASession, checked
before setActive(true) at both activation points (cache-hit and
ECM analysis). When the callback returns true, the session stays
inactive (passthrough) and the ECM monitor is stopped.

eDVBServicePlay sets the callback to check isCiConnected(), so
CSA-ALT channels decrypted by CI module never activate SoftCSA.

The previous eventCIConnected approach failed because the event
fires from PMTready() BEFORE ECM analysis completes - isActive()
was still false at that point. This approach checks at the actual
moment of activation, when isCiConnected() is reliable.
When switching from an encrypted channel to IPTV, enigma2 calls
unregisterService() which removes the service from the CA handler.
However, no CA PMT was sent to the softcam to signal that descrambling
should stop. This left the softcam in descrambling state, causing stale
ecm.info data to remain on the infobar.

Send a CA PMT with LIST_UPDATE and CMD_NOT_SELECTED before deleting the
service object so the softcam properly stops descrambling and cleans up
its state (e.g. removes ecm.info).

Guarded by m_protocol3_established to avoid sending Protocol-3 framed
messages to legacy softcams which don't understand the
message format. Legacy softcams are not affected by this issue anyway -
their per-service camd.socket connection closes on delete, which already
triggers cleanup via POLLHUP.
@jbleyel jbleyel merged commit 0396cff into openatv:master Feb 12, 2026
3 of 4 checks passed
@WXbet WXbet deleted the fix-softcsa branch February 12, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants